package com.yanqu.road.server.cmd.activity.stronghold;

import com.yanqu.road.pb.activity.StrongholdWarProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.strongholdwar.StrongholdModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_STRONGHOLD_ACTIVITY_GUIDE,desc = "据点战读完引导")
public class StrongholdGuideCmd extends AbstractCommand {
    private String guide;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        StrongholdWarProto.ReadStrongholdGuideReqMsg req = StrongholdWarProto.ReadStrongholdGuideReqMsg.parseFrom(packet.getBytes());
        guide = req.getGuide();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(StrongholdModule.class).finishGuide(guide);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
